<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ include file="/includes/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="<%=request.getContextPath()%>/css/common.css" type="text/css" />
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript">
	var type = '${type}';
	if(type=='add'){
		alert("系修改成功！");
	}
	function check(){
		var name = $("#department").val();
		if(name==""){
			$("#error").html("系名不能为空！");
			return false;
		}
	}
</script>
</head>
	<body>
		<div id="man_zone">
		<form action="editDepartmentSave.action" method="post" id="form1" onsubmit="return check();"  >
	 
			<input type="hidden"  name="department.id" value="${department.id}"/>
			<input type="hidden"  name="department.version" value="${department.version}"/>
	
		 <table class="table_style" border="0" align="center"  cellpadding="3" cellspacing="1" width="800px">
		   	<tr>
		   		<td class="left_title_1">所属学院:</td>
		   		<td>
		   			<select id="" name="department.institute.id" >
		   				<s:iterator value="institutes" id="institute" status="st">
		   					<option value="${id}" <s:if test="id == department.institute.id">selected</s:if>>${name}</option>
		   				</s:iterator>
		   			</select>
		   		</td>	
		   		<td class="left_title_1">专业名:</td>
		   		<td>
		   		<input type="text" id="department" name="department.name" value="${department.name}"/>
		   		<font id="error" color="red"></font>
		   		</td>
		   		<td class="left_title_1">系编号:</td>
		   		<td>
		   		<input type="text" id="department.code" name="department.code" value="${department.code}" readOnly/>
		   		<s:if test="hasFieldErrors() && fieldErrors.get('department.code') != null">
					<s:fielderror><s:param>department.code</s:param></s:fielderror>
				</s:if>
				<s:actionerror/>
		   		</td>	
		   		
		   	</tr>
		 
		  </table>
		<table class="table_style" border="0" align="center"  cellpadding="3" cellspacing="0">
	       	<tr>
	         <td>
	          <input type="submit" value="提交" />
	          <span class="sub_sp">&nbsp;</span>
	          <s:reset value="重置"/>  
	         </td>
	       </tr>
		</table>
		</form>
		</div>
	</body>
</html>